﻿/*
    合同实体数据整合
 */
using SOEI.Solution.DomainEntities.RegulatoryMange;
using System;
using System.Collections.Generic;
using System.Text;

namespace SOEI.Solution.StructEntities.Contracts
{
    public class ContractEntity
    {

        public ContractEntity() 
        {
            this.Flow     = new FlowEntity();
            this.Manuals  = new List<ManualEntity>();
            this.Searches = new List<SearchEntity>();
        }

        /// <summary>
        /// 合同别名
        /// </summary>
        public string AliasName { get; set; }

        /// <summary>
        /// 当前合同的文件编号
        /// </summary>
        public string FileId { get; set; }

        /// <summary>
        /// 文件名称
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 合同文件字节
        /// </summary>
        public byte[] FileBuffer { get; set; }

        /// <summary>
        /// 流程属性
        /// </summary>
        public FlowEntity Flow { get; set; }

        /// <summary>
        /// 合同签署人
        /// </summary>
        public ICollection<ManualEntity> Manuals { get; set; }
        /// <summary>
        /// 需要查询的集合
        /// </summary>
        public ICollection<SearchEntity> Searches { get; set; }
    }

    /// <summary>
    ///  流程实体 
    /// </summary>
    public class FlowEntity
    {
        /// <summary>
        /// 流程编号
        /// </summary>
        public string FlowId { get; set; }
        /// <summary>
        /// 发起人账户id，即发起本次签署的操作人个人账号id；如不传，默认由对接平台发起
        /// </summary>
        public string AccountId { get; set; }
        /// <summary>
        ///  发起方主体id，如存在个人代机构发起签约，则需传入机构id；如不传，则默认是对接平台
        /// </summary>
        public string OrganiAccountID { get; set; }
        /// <summary>
        /// 流程名称
        /// </summary>
        public string businessScene { get; set; }
    }

    /// <summary>
    /// 手动签署区
    /// </summary>
    public class ManualEntity
    { 
        /// <summary>
        /// 参与人编号
        /// </summary>
        public string AccountID { get; set; }

        /// <summary>
        /// 签署区位置信息
        /// </summary>
        public int PosPage { get; set; }

        /// <summary>
        /// x坐标，默认空
        /// </summary>
        public string PosX { get; set; }

        /// <summary>
        /// y坐标
        /// </summary>
        public string PosY { get; set; }

        /// <summary>
        /// 签署区顺序，默认1,且不小于1，顺序越小越先处理
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 第三方回调参数(默认为空)
        /// </summary>
        public string ThirdOrderNo { get; set; }
    }

    /// <summary>
    /// 关键字
    /// </summary>
    public class SearchEntity
    { 
        /// <summary>
        /// 查询坐标关键字
        /// </summary>
        public string Keyword { get; set; }
        /// <summary>
        /// 账号编号
        /// </summary>
        public string AccountID { get; set; }

        /// <summary>
        /// X轴的偏移量
        /// </summary>
        public decimal OffsetX { get; set; }

        /// <summary>
        /// Y轴的偏移量
        /// </summary>
        public decimal OffsetY { get; set; }

        /// <summary>
        /// 签署区顺序，默认1,且不小于1，顺序越小越先处理
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 第三方回调参数(默认为空)
        /// </summary>
        public string ThirdOrderNo { get; set; }
    }
}
